package com.trkj.pojo;

import java.io.Serializable;
import javax.persistence.*;

import com.alibaba.fastjson.annotation.JSONField;

import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.List;


/**
 * The persistent class for the SOCIAL_LEIXING database table.
 * 
 */
@Entity
@Table(name="SOCIAL_LEIXING")
@NamedQuery(name="SocialLeixing.findAll", query="SELECT s FROM SocialLeixing s")
public class SocialLeixing implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(name="SOCIAL_LEIXING_SBLXID_GENERATOR", sequenceName="HR")
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="SOCIAL_LEIXING_SBLXID_GENERATOR")
	@Column(name="SBLX_ID")
	private long sblxId;

	@Column(name="SBLX_BZ")
	private String sblxBz;
	@JSONField(format="yyyy-MM-dd HH:mm:ss")
	@Column(name="SBLX_DATE")
	private Timestamp sblxDate;

	@Column(name="SBLX_NAME")
	private String sblxName;

	@Column(name="SBLX_PERSON")
	private String sblxPerson;
	@JSONField(format="yyyy-MM-dd HH:mm:ss")
	@Column(name="SBLX_UPDATE")
	private Timestamp sblxUpdate;

	@Column(name="SBLX_ZT")
	private BigDecimal sblxZt;

	//bi-directional many-to-one association to SocialSecurity
	@OneToMany(mappedBy="socialLeixing")
	@JSONField(serialize=false)
	private List<SocialSecurity> socialSecurities;

	public SocialLeixing() {
	}

	public long getSblxId() {
		return this.sblxId;
	}

	public void setSblxId(long sblxId) {
		this.sblxId = sblxId;
	}

	public String getSblxBz() {
		return this.sblxBz;
	}

	public void setSblxBz(String sblxBz) {
		this.sblxBz = sblxBz;
	}

	public Timestamp getSblxDate() {
		return this.sblxDate;
	}

	public void setSblxDate(Timestamp sblxDate) {
		this.sblxDate = sblxDate;
	}

	public String getSblxName() {
		return this.sblxName;
	}

	public void setSblxName(String sblxName) {
		this.sblxName = sblxName;
	}

	public String getSblxPerson() {
		return this.sblxPerson;
	}

	public void setSblxPerson(String sblxPerson) {
		this.sblxPerson = sblxPerson;
	}

	public Timestamp getSblxUpdate() {
		return this.sblxUpdate;
	}

	public void setSblxUpdate(Timestamp sblxUpdate) {
		this.sblxUpdate = sblxUpdate;
	}

	public BigDecimal getSblxZt() {
		return this.sblxZt;
	}

	public void setSblxZt(BigDecimal sblxZt) {
		this.sblxZt = sblxZt;
	}

	public List<SocialSecurity> getSocialSecurities() {
		return this.socialSecurities;
	}

	public void setSocialSecurities(List<SocialSecurity> socialSecurities) {
		this.socialSecurities = socialSecurities;
	}

	public SocialSecurity addSocialSecurity(SocialSecurity socialSecurity) {
		getSocialSecurities().add(socialSecurity);
		socialSecurity.setSocialLeixing(this);

		return socialSecurity;
	}

	public SocialSecurity removeSocialSecurity(SocialSecurity socialSecurity) {
		getSocialSecurities().remove(socialSecurity);
		socialSecurity.setSocialLeixing(null);

		return socialSecurity;
	}

}